package com.example.demo.controller.vo;

import jakarta.validation.Valid;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serializable;

@Data
public class TestCReq implements Serializable {

    @NotNull(message = "id不能为空")
    private Long id;

    @NotBlank(message = "姓名不能为空")
    private String name;

    /**
     * 嵌套验证必须加上@Valid
     */
    @Valid
    @NotNull
    private TestCReqDTO testCReqDTO;
}
